package com.dlwx.firefighting.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.dlwx.firefighting.R;
import com.dlwx.firefighting.config.Constant;

/**
 * Created by Administrator on 2018/3/24.
 */

public class WithdrawHisAdapter extends ListBaseAdapter<String> {
    Context context;
    int type;
    public WithdrawHisAdapter(Context context, int type) {
        super(context);
        this.context=context;
        this.type=type;
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_withdraw_his;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        ImageView imageView=holder.getView(R.id.img_head);
        TextView tv_head=holder.getView(R.id.tv_head);
        TextView tv_time=holder.getView(R.id.tv_time);
        TextView tv_money=holder.getView(R.id.tv_money);
        TextView tv_status=holder.getView(R.id.tv_status);
        TextView tv_content=holder.getView(R.id.tv_content);
        switch (type){
            case Constant.WITH_DRAW:
                imageView.setBackgroundResource(R.mipmap.tips);
                tv_head.setText("提示助手");

                break;
            case Constant.RED_PACKAGE:
                imageView.setBackgroundResource(R.mipmap.red_package_red);
                tv_head.setText("红包记录");
                break;
            case Constant.TRADE:
                imageView.setBackgroundResource(R.mipmap.dikou);
                tv_head.setText("抵扣记录");
                break;
        }
    }
}
